<div class="row">
    <div class="col-xs-12">
        <g:form id="form" useToken="true" url="${url}" class="form-horizontal" role="form">
            <input type="hidden" class="input-value" name="id"  value="${photoFramePrice?.id}"/>
            <div class="form-group  message alert">

            </div>
            <div class="form-group form-field field-photoFrame">
                <label class="col-sm-3 control-label no-padding-right" for="form-photoFrame">相框名称: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:select name="photoFrameId" id="form-photoFrame" from="${photoFrameList}" value="${photoFramePrice?.photoFrame?.id}"   optionKey="id"  optionValue="name"></g:select>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-photoSize">
                <label class="col-sm-3 control-label no-padding-right" for="form-photoSize"> 相框尺寸: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:select name="photoSizeId" id="form-photoSize" from="${photoSizeList}" optionKey="id"  value="${photoFramePrice?.photoSize?.id}"  optionValue="name" ></g:select>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-price">
                <label class="col-sm-3 control-label no-padding-right" for="form-price"> 价格: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:textField  name="price" id="form-price" value="${photoFramePrice?.price}" placeholder="输入价格" class="width-100" />
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="form-group form-field field-isDeal">
                <label class="col-sm-3 control-label no-padding-right" for="form-isDeal"> 有效: </label>
                <div class="col-xs-12 col-sm-4">
                    <g:checkBox name="isDeal" id="form-isDeal" value="${photoFramePrice?.isDeal==0?photoFramePrice?.isDeal:1}" ></g:checkBox>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline fieldMsg">  </div>
            </div>

            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit" formaction="save">
                        <i class="icon-ok bigger-110"></i>
                        提交
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="icon-undo bigger-110"></i>
                        重置
                    </button>
                </div>
            </div>
        </g:form>
    </div>
</div>
<r:require module="mng_form"></r:require>
<r:script>

        (function($) {
            $(".selectPicker").selectPicker({
                width: 700, height: 500
            });
            $(".chosen-select").chosen();
            $('#form').ajaxForm({
                beforeSubmit: function() {
                    $("#form").jqFormClearErr();
                    $("#form").find("input[type=submit]").attr("disabled", true);
                },
                success: function(response) {
                    $("#form").find("input[type=submit]").attr("disabled", false);
                    $("#form").jqFormResponse({
                        response: response,
                        successUri: "<g:createLink />"
                    });

                },
                error: function() {
                    $("#form").find("input[type=submit]").attr("disabled", false);
                }
            });
        }(jQuery));


</r:script>